GrapeCity.Xaml.SpreadSheet.Data
SetArray(Int32,Int32,Object[,]) Method
Example 


GrapeCity.Xaml.SpreadSheet.Data Namespace > Worksheet Class > SetArray Method : SetArray(Int32,Int32,Object[,]) Method
Row index
Column index
Array from which to set values
Sets the values in the specified two-dimensional array of objects into the specified range of cells on this sheet.
Syntax
'Declaration
 
Public Overloads Sub SetArray( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal value(,) As Object _
) 
'Usage
 
Dim instance As Worksheet
Dim row As Integer
Dim column As Integer
Dim value() As Object
 
instance.SetArray(row, column, value)
public void SetArray( 
   int row,
   int column,
   object[,] value
)

Parameters

row
Row index
column
Column index
value
Array from which to set values
Example
This example uses the SetArray method.
object[,] arr;
gcSpreadSheet1.ActiveSheet.SetArray(1, 0, new String[,] { { "One", "Two" } });
gcSpreadSheet1.ActiveSheet.SetArray(2, 1, new String[,] { { "Three", "Four" } }, false);
arr = gcSpreadSheet1.ActiveSheet.GetArray(1, 0, 3, 2);
gcSpreadSheet1.ActiveSheet.Cells[3, 3].Text = "The value of the first element in the array is " + arr.GetValue(0, 0).ToString();
Dim arr(,) As Object
GcSpreadSheet1.ActiveSheet.SetArray(1, 0, New String(,) {{"One", "Two"}})
GcSpreadSheet1.ActiveSheet.SetArray(2, 1, New String(,) {{"Three", "Four"}}, False)
arr = GcSpreadSheet1.ActiveSheet.GetArray(1, 0, 3, 2)
GcSpreadSheet1.ActiveSheet.Cells(3, 3).Text = "The value of the first element in the array is " & arr.GetValue(0, 0).ToString()
See Also

Reference

Worksheet Class
Worksheet Members
Overload List